<{include file="Public/top.html" }>
<style>
    .days{width: 400px !important;}
</style>
</head>
<body>
<div id="warpper" style="height: 900px;">
    <div class="content" style="height: 900px;">

        <div class="form-box border0 border-box">
            <form action="<{u($smarty.const.ACTION_NAME)}>" class="ui-form" method="post" id="addManagerForm">

                <input type="hidden"  name="oid" value="<{$oid}>" />
                <div class="ui-form-item">
                    <label class="ui-label">当前时间：</label>
                    <span><{$now|date_format:"%Y-%m-%d %H:%M"}></span>
                </div>

                <div class="ui-form-item">
                    <label class="ui-label">订单日期：</label>
                    <span>
                        <{foreach from=$refundArray key=date item=refund}>
                        <span class="days"><input class="date" type="checkbox" <{if $refund lte 0}>disabled<{/if}> value="<{$refund}>" ><{$date}>:房价<{$dayPrice[$date]}>元   可退金额：<{$refund}>元</span><br />
                        <{/foreach}>
                    </span>
                </div>
                <div class="ui-form-item">
                    <label class="ui-label">订单总金额：</label>
                    <input type="number" class="ui-text" id="total" readonly value="<{$totalMoney}>" required/> 元
                </div>
                <div class="ui-form-item">
                    <label class="ui-label">退款金额：</label>
                    <input max="<{$totalMoney}>" type="number" class="ui-text" id="refund" name="refund" value="<{$obj.area}>" required/> 元 <a href="javascript:void(0)" onclick="$('#refund').val($('#total').val())">全部</a>
                </div>
                <div class="ui-form-item">
                    <label class="ui-label">退款规则：</label>
                    <span class="days">入住前<{$smarty.const.CANCEL_RETURN_DAYS}>天，中午12点前取消订单,可全额退款，<br />在此之后退还未住宿房费的<{$smarty.const.CANCEL_RETURN_SCALE}>%</span>
                </div>



        <div class="ui-form-item">
            <label class="ui-label">备注说明：</label>
            <textarea  class="ui-text" name="desc"  style="width: 300px;height:100px;"></textarea>
        </div>

                <div class="integral_btn-group">
                    <input type="submit" value="提交" class="ui-button"/>
                </div>

            </form>
        </div>
    </div>
</div>
</body>
<{include file="Public/foot.html" }>

<script>
    $('.date').click(function(){
        var sum=0;
        $('.date').each(function(index,ele){
            if(ele.checked){
                sum +=parseFloat(ele.value);
            }
        }
        )
        $('#refund').val(sum);

    });

    $('#addManagerForm').submit(function(){
        console.log($('#addManagerForm').serialize());
        return false;
    })


</script>